/*---------------------------------------------------------------------------
	ZaRan	-	A Totallly Automatic CFD Software
	Copyright (C) ,Since 2020
-------------------------------------------------------------------------------
License
	This file is part of ZaRan.

!	@file		gird.h
!	@brief	the purpose of this file.
!	@author	Chen Jie.
\*---------------------------------------------------------------------------*/
#include"model/include/base.h"
#include"Utility/include/math.h"
#include<iostream>
#include<fstream>
#include<algorithm>
void ModBase::SetBoxMin(const Point& box_min)
{
	box_min_ = box_min;
}
void ModBase::SetBoxMax(const Point& box_max)
{
	box_max_ = box_max;
}
//Point ModBase::GetClosestPoint(const Point& pt)
//{
	//int i, id = -1;
	//double mindis = DBL_MAX;
	//double dis;
	//for (i = 0; i < modelPoint_.size(); i++)
	//{
	//	dis = distance(modelPoint_[i], pt);
	//	mindis = std::min(mindis, dis);
	//	if (abs(mindis - dis) < delta)
	//		id = i;
	//}
	//return modelPoint_[id];
//}

//double ModBase::NearestDistance(const Point& pt)
//{
	//int i, j;
	//double min_dist = DBL_MAX;
	//for (i = 0; i < modelPoint_.size(); j = i++)
	//{
	//	min_dist = std::min(min_dist, distance(modelPoint_[i], pt));
	//}
	//return min_dist;
//}